#ifndef KMP_H_
#define KMP_H_
#include<string>
using namespace std;
class  KMP
{
public:
	KMP(string target, string match);
	~ KMP();
	int FindMatch();
	int GetLoopCount() { return loopcount; }
private:
	void StringInerMatchTable(const string& pattern);
	const string target;
	const string findstr;
	int* pattern_table;
	int loopcount;
private:
	KMP(const KMP &) = delete;
	KMP &operator =(const KMP &) = delete;
	KMP() = delete;
};

#endif
